import {FormSchema} from "@/components/Form";
import {h} from 'vue';
import {NTag, NInput} from 'naive-ui';

export const columns = [
  {
    title: '玩家标识',
    key: 'user_id',
    width: 100
  },
  {
    title: '提现总额',
    key: 'rflect_money',
    width: 100
  },
  {
    title: "新人礼",
    key: "newcomer_money",
    width: 100,
    render(row) {
      return h(
        'span',
        { style: row.newcomer_money >200 ? 'color:red' : 'color:green' },
        {
            default: () => (row.newcomer_money),
        }
      );
    },
  },
  {
    title: "财富收益",
    key: "wealth_money",
    width: 100
  },
  {
    title: "财富等级",
    key: "wealth_lv",
    width: 100,
    render(row) {
      if (row.wealth_lv) {
        return row.wealth_lv == "1" ? "一级财富" : row.wealthLevel == "2" ? "二级财富" : row.wealthLevel == "3" ? "三级财富" : "暂无等级"
      }
      return "暂无";
    }
  }, 
  {
    title: "等级红包",
    key: "lv_money",
    width: 100,
    render(row) {
      return h(
        'span',
        { style: row.lv_money >1000 ? 'color:red' : 'color:green' },
        {
            default: () => (row.lv_money),
        }
      );
    },
  },
  {
    title: "签到红包",
    key: "sign_money",
    width: 100
  }, {
    title: "主播福利",
    key: "live_money",
    width: 100,
    render(row) {
      return h(
        'span',
        { style: 'color:green' },
        {
            default: () => (row.live_money),
        }
      );
    },
  }, {
    title: "邀请福利",
    key: "invite_money",
    width: 100,
  },{
    title: "新人礼（红包明细）",
    key: "gen_newcomer_list",
    width: 200
  },{
    title: "角色等级（红包明细）",
    key: "gen_lv_list",
    width: 200
  },{
    title: "签到（红包明细）",
    key: "gen_sign_list",
    width: 200
  },{
    title: "在线时长（分）",
    key: "online_time",
    width: 100
  },{
    title: "邀请记录",
    key: "accord_invitor",
    width: 200
  }, {
    title: "创建时间",
    key: "create_time",
    width: 150,
  },
];
export const editCloumns: FormSchema[] = [
  {
    field: 'wealth_money',
    component: 'NInput',
    label: '财富收益',
    componentProps: {
      placeholder: "财富收益"
    }
  },  {
    field: 'newcomer_money',
    component: 'NInput',
    label: '新人礼',
    componentProps: {
      placeholder: "新人礼"
    }
  },  {
    field: 'lv_money',
    component: 'NInput',
    label: '等级红包',
    componentProps: {
      placeholder: "等级红包"
    }
  },{
    field: 'live_money',
    component: 'NInput',
    label: '主播红包',
    componentProps: {
      placeholder: "主播红包"
    }
  }
];

